﻿using BusinessLogic.Configuration;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using BusinessLogic.Messages;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MailSetting
{
    public partial class frmSetting : Form
    {
        public frmSetting()
        {
            InitializeComponent();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            string serverName = txtserverName.Text.Trim();
            string dataName = txtDatabaseName.Text.Trim();
            string account = txtAccount.Text.Trim();
            string passWord = txtPassword.Text.Trim();
            string sqlConnection = SqlHelper.CreateConnectionString(false, serverName: serverName, databaseName: dataName, userName: account, password: passWord, timeout: 120);
            bool save = SqlHelper.SaveConnectionString("PayrollSqlConnection", sqlConnection);
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnreceive_Click(object sender, EventArgs e)
        {

        }
    }
}
